import request from '@/utils/request'

const URL = 'op/room'

export function addRoom(form) {
  return request({
    url: URL + '/add',
    method: 'post',
    data: form
  })
}

export function editRoom(form) {
  return request({
    url: URL + '/update',
    method: 'post',
    data: form
  })
}

export function delRoom(roomIds) {
  return request({
    url: URL + '/delete',
    method: 'delete',
    params: {
      roomIds: roomIds
    }
  })
}

export function getRoomById(roomId) {
  return request({
    url: URL + '/' + roomId,
    method: 'post',
    data: {
    }
  })
}

export function getAllRoomList(params) {
  return request({
    url: URL + '/list',
    method: 'post',
    data: {
      ...params
    }
  })
}

